#include "vector.hpp"
#include <math.h>

float Vector::length() {
    return sqrt(x * x + y * y + z * z);
}

void Vector::normalize() {
    float len = length();
    if (len < 0.0001 && len > -0.0001) {
        return;
    }

    x /= len;
    y /= len;
    z /= len;
}